package main

import "fmt"
import "project01/com/oop/extends/model"

/**
 * @author: guangcheng
 * @date:   2020/11/23 9:49
 * @version  V1.0
 * @description:
 *
 */
func main() {

	//当我们对结构体嵌入了匿名结构体使用方法会发生变化
	pupil := &model.Pupil{}
	pupil.Student.Name = "tom~"
	pupil.Student.Age = 8
	pupil.Testing()
	pupil.Student.SetScore(70)
	pupil.Student.ShowInfo()
	fmt.Println("res=", pupil.Student.GetSum(1, 2))

	graduate := &model.Graduate{}
	graduate.Student.Name = "mary~"
	graduate.Student.Age = 28
	graduate.Testing()
	graduate.Student.SetScore(90)
	graduate.Student.ShowInfo()
	fmt.Println("res=", graduate.Student.GetSum(10, 20))
}
